<script>
export default {
  name: "IndexView"
}
</script>

<template>
  <el-container style="height: 100vh;">
    <!-- 顶部导航栏 -->
    <el-header class="header">
      <el-menu
          mode="horizontal"
          background-color="#2c3e50"
          text-color="#ecf0f1"
          active-text-color="#f39c12"
      >
        <el-menu-item index="1">首页</el-menu-item>
        <el-menu-item index="2">学生管理</el-menu-item>
        <el-menu-item index="3">课程管理</el-menu-item>
        <el-menu-item index="4">用户管理</el-menu-item>
        <el-menu-item index="5">用户权限</el-menu-item>
        <el-menu-item index="6">备用功能1</el-menu-item>
        <el-menu-item index="7">备用功能2</el-menu-item>
      </el-menu>
    </el-header>

    <el-container>
      <!-- 侧边栏导航 -->
      <el-aside width="220px" class="aside">
        <el-menu
            default-active="1"
            class="el-menu-vertical-demo"
            background-color="#34495e"
            text-color="#ffffff"
            active-text-color="#ffffff"
        >
          <el-submenu index="1">
            <template #title>
              <i class="el-icon-user"></i>
              <span>学生管理</span>
            </template>
            <el-menu-item index="1-1">
              <router-link to="/index/student">学生列表</router-link>
            </el-menu-item>
          </el-submenu>
          <el-submenu index="2">
            <template #title>
              <i class="el-icon-book"></i>
              <span>课程管理</span>
            </template>
            <el-menu-item index="2-1">
              <router-link to="/index/course">课程列表</router-link>
            </el-menu-item>
          </el-submenu>
<!--           <el-menu-item index="2-1">课程列表</el-menu-item>-->


          <el-submenu index="3">
            <template #title>
              <i class="el-icon-user-solid"></i>
              <span>用户管理</span>
            </template>
            <el-menu-item index="3-1">用户列表</el-menu-item>
          </el-submenu>
          <el-submenu index="4">
            <template #title>
              <i class="el-icon-lock"></i>
              <span>用户权限</span>
            </template>
            <el-menu-item index="4-1">权限设置</el-menu-item>
          </el-submenu>
          <el-submenu index="5">
            <template #title>
              <i class="el-icon-box"></i>
              <span>备用功能1</span>
            </template>
            <el-menu-item index="5-1">子功能1</el-menu-item>
          </el-submenu>
          <el-submenu index="6">
            <template #title>
              <i class="el-icon-box"></i>
              <span>备用功能2</span>
            </template>
            <el-menu-item index="6-1">子功能2</el-menu-item>
          </el-submenu>
        </el-menu>
      </el-aside>
      <!-- 内容区域 -->
      <el-main class="main">
        <router-view></router-view>
      </el-main>
    </el-container>
  </el-container>
</template>

<style scoped>
.header {
  background-color: #2c3e50;
  color: #ecf0f1;
  line-height: 60px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.aside {
  background-color: #34495e;
  color: #ecf0f1;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.main {
  background-color: #ecf0f1;
  color: #333;
  padding: 20px;
  border-radius: 8px;
  margin: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.el-menu {
  border-right: none;
}

.el-menu-item {
  padding: 0 20px;
}

.el-submenu .el-menu-item {
  padding: 0 40px;
}
</style>